<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>赞助推荐 | SocialHub</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #4361ee;
            --primary-light: #eef0ff;
            --primary-dark: #3a0ca3;
            --secondary: #f72585;
            --accent: #4cc9f0;
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --light-gray: #e9ecef;
            --success: #38b000;
            --warning: #ffaa00;
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: #f5f7ff;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .navbar {
            background-color: white;
            box-shadow: 0 2px 15px rgba(0,0,0,0.05);
            padding: 0.75rem 1rem;
        }
        
        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .section-title {
            font-size: 2rem;
            font-weight: 700;
            margin: 2rem 0;
            color: var(--primary-dark);
            position: relative;
            padding-bottom: 0.75rem;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 60px;
            height: 4px;
            background-color: var(--primary);
            border-radius: 2px;
        }
        
        .sponsorship-card {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow: hidden;
            margin-bottom: 1.5rem;
            transition: transform 0.2s, box-shadow 0.2s;
            border: none;
        }
        
        .sponsorship-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        
        .card-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--light-gray);
            background-color: white;
        }
        
        .card-body {
            padding: 1.25rem;
        }
        
        .card-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--light-gray);
            background-color: white;
        }
        
        /* 作者信息样式 */
        .author-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .author-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .author-name {
            font-weight: 600;
            font-size: 1rem;
        }
        
        .post-time {
            color: var(--gray);
            font-size: 0.85rem;
        }
        
        /* 图片容器样式 */
        .image-container {
            position: relative;
            margin-bottom: 1rem;
        }
        
        .single-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: 8px;
        }
        
        .multi-image {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .multi-image img {
            width: 100%;
            height: 100px;
            object-fit: cover;
        }
        
        .multi-image-3 {
            grid-template-areas: 
                "img1 img2"
                "img1 img3";
        }
        
        .multi-image-3 img:first-child {
            grid-area: img1;
            height: 100%;
        }
        
        .no-image {
            background-color: var(--light-gray);
            height: 160px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            color: var(--gray);
        }
        
        /* 标题和描述样式 */
        .sponsorship-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--dark);
            line-height: 1.4;
        }
        
        .sponsorship-desc {
            color: var(--gray);
            font-size: 0.95rem;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 标签样式 */
        .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .tag {
            background-color: var(--primary-light);
            color: var(--primary);
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.85rem;
            text-decoration: none;
        }
        
        /* 统计信息样式 */
        .stats {
            display: flex;
            align-items: center;
            gap: 1.25rem;
            color: var(--gray);
            font-size: 0.9rem;
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        /* 操作按钮样式 */
        .actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--gray);
            padding: 0.5rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.9rem;
        }
        
        .action-btn:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        .action-btn.liked {
            color: var(--secondary);
        }
        
        .action-btn.saved {
            color: var(--primary);
        }
        
        /* 布局特定样式 */
        .horizontal-layout .sponsorship-card {
            display: flex;
            height: 100%;
        }
        
        .horizontal-layout .image-container {
            flex: 0 0 200px;
            margin-bottom: 0;
            margin-right: 1rem;
        }
        
        .horizontal-layout .single-image {
            height: 100%;
        }
        
        .horizontal-layout .multi-image img {
            height: 100%;
        }
        
        .horizontal-layout .content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .horizontal-layout .card-footer {
            margin-top: auto;
        }
        
        .grid-layout {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }
        
        .featured-layout .sponsorship-card {
            border: 2px solid var(--primary);
        }
        
        .featured-layout .card-header {
            background-color: var(--primary-light);
            border-bottom: 2px solid var(--primary);
        }
        
        .featured-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: var(--secondary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            z-index: 1;
        }
        
        @media (max-width: 768px) {
            .horizontal-layout .sponsorship-card {
                flex-direction: column;
            }
            
            .horizontal-layout .image-container {
                flex: none;
                width: 100%;
                margin-right: 0;
                margin-bottom: 1rem;
            }
            
            .horizontal-layout .single-image {
                height: 180px;
            }
            
            .section-title {
                font-size: 1.75rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a href="#" class="logo">
                <i class="fas fa-handshake"></i>
                SocialHub
            </a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto align-items-center gap-3">
                    <li class="nav-item">
                        <a href="#" class="nav-link active">赞助推荐</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link">发现</a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link">消息</a>
                    </li>
                    <li class="nav-item">
                        <button class="btn btn-primary">
                            <i class="fas fa-plus me-1"></i> 发起赞助
                        </button>
                    </li>
                    <li class="nav-item">
                        <img src="https://picsum.photos/100/100?random=1" alt="用户头像" class="rounded-circle" style="width: 38px; height: 38px; object-fit: cover;">
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    
    <div class="container py-4">
        <!-- 精选赞助 - 大图布局 -->
        <h2 class="section-title">精选赞助</h2>
        <div class="featured-layout mb-5">
            <div class="sponsorship-card">
                <div class="card-header">
                    <div class="author-info">
                        <img src="https://picsum.photos/100/100?random=10" alt="环保协会头像" class="author-avatar">
                        <div>
                            <div class="author-name">绿色未来环保协会</div>
                            <div class="post-time">发布于 3天前</div>
                        </div>
                    </div>
                </div>
                
                <div class="card-body">
                    <div class="image-container">
                        <span class="featured-badge">精选</span>
                        <img src="https://picsum.photos/1200/400?random=20" alt="海洋清洁项目" class="single-image">
                    </div>
                    
                    <h3 class="sponsorship-title">海洋塑料垃圾清理计划 - 保护蓝色家园</h3>
                    
                    <p class="sponsorship-desc">我们计划组织志愿者团队进行沿海地区塑料垃圾清理，并开展环保教育活动，提高公众对海洋污染的认识。寻求赞助以支持清洁设备、交通和宣传材料的费用。</p>
                    
                    <div class="tags">
                        <span class="tag">环保</span>
                        <span class="tag">海洋保护</span>
                        <span class="tag">志愿者</span>
                        <span class="tag">教育</span>
                    </div>
                </div>
                
                <div class="card-footer d-flex justify-content-between align-items-center">
                    <div class="stats">
                        <div class="stat-item">
                            <i class="fas fa-eye"></i>
                            <span>2.5k</span>
                        </div>
                        <div class="stat-item">
                            <i class="fas fa-comment"></i>
                            <span>128</span>
                        </div>
                        <div class="stat-item">
                            <i class="fas fa-share-alt"></i>
                            <span>56</span>
                        </div>
                    </div>
                    
                    <div class="actions">
                        <button class="action-btn like-btn" data-id="1">
                            <i class="far fa-heart"></i>
                            <span>342</span>
                        </button>
                        <button class="action-btn save-btn" data-id="1">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="btn btn-primary btn-sm">
                            立即赞助
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 横向布局赞助 -->
        <h2 class="section-title">热门赞助</h2>
        <div class="horizontal-layout mb-5">
            <!-- 多图赞助 -->
            <div class="sponsorship-card">
                <div class="image-container">
                    <div class="multi-image multi-image-3">
                        <img src="https://picsum.photos/400/400?random=30" alt="乡村图书馆项目图片1">
                        <img src="https://picsum.photos/400/400?random=31" alt="乡村图书馆项目图片2">
                        <img src="https://picsum.photos/400/400?random=32" alt="乡村图书馆项目图片3">
                    </div>
                </div>
                
                <div class="content">
                    <div class="card-header p-0 pb-1">
                        <div class="author-info">
                            <img src="https://picsum.photos/100/100?random=11" alt="公益读书社头像" class="author-avatar">
                            <div>
                                <div class="author-name">公益读书社</div>
                                <div class="post-time">发布于 1周前</div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="card-body p-0">
                        <h3 class="sponsorship-title">乡村图书馆建设 - 知识改变命运</h3>
                        
                        <p class="sponsorship-desc">为偏远山区乡村小学建立图书馆，提供适合儿童阅读的书籍，培养阅读习惯，拓宽孩子们的视野。目前已完成3所，计划再建5所。</p>
                        
                        <div class="tags">
                            <span class="tag">教育</span>
                            <span class="tag">乡村</span>
                            <span class="tag">图书馆</span>
                        </div>
                    </div>
                    
                    <div class="card-footer d-flex justify-content-between align-items-center p-0 pt-1">
                        <div class="stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i>
                                <span>1.8k</span>
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i>
                                <span>95</span>
                            </div>
                        </div>
                        
                        <div class="actions">
                            <button class="action-btn like-btn" data-id="2">
                                <i class="fas fa-heart liked"></i>
                                <span>287</span>
                            </button>
                            <button class="action-btn save-btn" data-id="2">
                                <i class="far fa-bookmark"></i>
                                <span>收藏</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 单图赞助 -->
            <div class="sponsorship-card">
                <div class="image-container">
                    <img src="https://picsum.photos/400/400?random=40" alt="流浪动物救助项目" class="single-image">
                </div>
                
                <div class="content">
                    <div class="card-header p-0 pb-1">
                        <div class="author-info">
                            <img src="https://picsum.photos/100/100?random=12" alt="爱心动物保护协会头像" class="author-avatar">
                            <div>
                                <div class="author-name">爱心动物保护协会</div>
                                <div class="post-time">发布于 5天前</div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="card-body p-0">
                        <h3 class="sponsorship-title">流浪动物救助与安置计划</h3>
                        
                        <p class="sponsorship-desc">为城市流浪动物提供临时收容、医疗救助和绝育服务，并努力为它们寻找永久的家。需要资金支持食物、医疗和设施维护。</p>
                        
                        <div class="tags">
                            <span class="tag">动物保护</span>
                            <span class="tag">救助</span>
                            <span class="tag">公益</span>
                        </div>
                    </div>
                    
                    <div class="card-footer d-flex justify-content-between align-items-center p-0 pt-1">
                        <div class="stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i>
                                <span>1.5k</span>
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i>
                                <span>78</span>
                            </div>
                        </div>
                        
                        <div class="actions">
                            <button class="action-btn like-btn" data-id="3">
                                <i class="far fa-heart"></i>
                                <span>215</span>
                            </button>
                            <button class="action-btn save-btn" data-id="3">
                                <i class="fas fa-bookmark saved"></i>
                                <span>已收藏</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 网格布局赞助 -->
        <h2 class="section-title">更多赞助推荐</h2>
        <div class="grid-layout">
            <!-- 无图赞助 -->
            <div class="sponsorship-card">
                <div class="card-header">
                    <div class="author-info">
                        <img src="https://picsum.photos/100/100?random=13" alt="大学生创业团队头像" class="author-avatar">
                        <div>
                            <div class="author-name">大学生创业团队</div>
                            <div class="post-time">发布于 2天前</div>
                        </div>
                    </div>
                </div>
                
                <div class="card-body">
                    <div class="image-container">
                        <div class="no-image">
                            <i class="fas fa-lightbulb fa-2x"></i>
                        </div>
                    </div>
                    
                    <h3 class="sponsorship-title">校园创新创业大赛 - 项目孵化支持</h3>
                    
                    <p class="sponsorship-desc">支持大学生创新创业项目，提供启动资金和导师指导，帮助有潜力的项目实现商业化转型，促进就业和创新。</p>
                    
                    <div class="tags">
                        <span class="tag">创业</span>
                        <span class="tag">教育</span>
                        <span class="tag">青年</span>
                    </div>
                </div>
                
                <div class="card-footer d-flex justify-content-between align-items-center">
                    <div class="stats">
                        <div class="stat-item">
                            <i class="fas fa-eye"></i>
                            <span>980</span>
                        </div>
                        <div class="stat-item">
                            <i class="fas fa-comment"></i>
                            <span>42</span>
                        </div>
                    </div>
                    
                    <div class="actions">
                        <button class="action-btn like-btn" data-id="4">
                            <i class="far fa-heart"></i>
                            <span>136</span>
                        </button>
                        <button class="action-btn save-btn" data-id="4">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 双图赞助 -->
            <div class="sponsorship-card">
                <div class="card-header">
                    <div class="author-info">
                        <img src="https://picsum.photos/100/100?random=14" alt="传统文化保护协会头像" class="author-avatar">
                        <div>
                            <div class="author-name">传统文化保护协会</div>
                            <div class="post-time">发布于 10天前</div>
                        </div>
                    </div>
                </div>
                
                <div class="card-body">
                    <div class="image-container">
                        <div class="multi-image">
                            <img src="https://picsum.photos/400/400?random=50" alt="传统手工艺保护项目图片1">
                            <img src="https://picsum.photos/400/400?random=51" alt="传统手工艺保护项目图片2">
                        </div>
                    </div>
                    
                    <h3 class="sponsorship-title">传统手工艺传承与保护计划</h3>
                    
                    <p class="sponsorship-desc">支持民间手工艺人，记录和保护即将失传的传统技艺，组织工作坊和展览，让更多人了解和喜爱传统文化。</p>
                    
                    <div class="tags">
                        <span class="tag">文化</span>
                        <span class="tag">传统</span>
                        <span class="tag">手工艺</span>
                    </div>
                </div>
                
                <div class="card-footer d-flex justify-content-between align-items-center">
                    <div class="stats">
                        <div class="stat-item">
                            <i class="fas fa-eye"></i>
                            <span>756</span>
                        </div>
                        <div class="stat-item">
                            <i class="fas fa-comment"></i>
                            <span>31</span>
                        </div>
                    </div>
                    
                    <div class="actions">
                        <button class="action-btn like-btn" data-id="5">
                            <i class="far fa-heart"></i>
                            <span>98</span>
                        </button>
                        <button class="action-btn save-btn" data-id="5">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 单图赞助 -->
            <div class="sponsorship-card">
                <div class="card-header">
                    <div class="author-info">
                        <img src="https://picsum.photos/100/100?random=15" alt="健康医疗基金会头像" class="author-avatar">
                        <div>
                            <div class="author-name">健康医疗基金会</div>
                            <div class="post-time">发布于 1周前</div>
                        </div>
                    </div>
                </div>
                
                <div class="card-body">
                    <div class="image-container">
                        <img src="https://picsum.photos/400/400?random=60" alt="偏远地区医疗援助项目" class="single-image">
                    </div>
                    
                    <h3 class="sponsorship-title">偏远地区医疗援助计划</h3>
                    
                    <p class="sponsorship-desc">组织医疗团队前往偏远地区提供免费诊疗服务，捐赠药品和医疗设备，改善当地医疗条件，保障居民健康。</p>
                    
                    <div class="tags">
                        <span class="tag">医疗</span>
                        <span class="tag">公益</span>
                        <span class="tag">健康</span>
                    </div>
                </div>
                
                <div class="card-footer d-flex justify-content-between align-items-center">
                    <div class="stats">
                        <div class="stat-item">
                            <i class="fas fa-eye"></i>
                            <span>1.2k</span>
                        </div>
                        <div class="stat-item">
                            <i class="fas fa-comment"></i>
                            <span>67</span>
                        </div>
                    </div>
                    
                    <div class="actions">
                        <button class="action-btn like-btn" data-id="6">
                            <i class="fas fa-heart liked"></i>
                            <span>189</span>
                        </button>
                        <button class="action-btn save-btn" data-id="6">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多按钮 -->
        <div class="text-center mt-5">
            <button class="btn btn-outline-primary px-5 py-2">
                <i class="fas fa-spinner mr-2"></i> 加载更多赞助
            </button>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 点赞功能
            const likeBtns = document.querySelectorAll('.like-btn');
            likeBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    this.classList.toggle('liked');
                    const icon = this.querySelector('i');
                    const count = this.querySelector('span');
                    let currentCount = parseInt(count.textContent);
                    
                    if (this.classList.contains('liked')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        count.textContent = currentCount + 1;
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        count.textContent = currentCount - 1;
                    }
                });
            });
            
            // 收藏功能
            const saveBtns = document.querySelectorAll('.save-btn');
            saveBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    this.classList.toggle('saved');
                    const icon = this.querySelector('i');
                    const text = this.querySelector('span');
                    
                    if (this.classList.contains('saved')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        text.textContent = '已收藏';
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        text.textContent = '收藏';
                    }
                });
            });
        });
    </script>
</body>
</html>
    
